{extend name="../../admin/view/main"}

{block name='content'}
<form action="{:sysuri()}" class="layui-card layui-form" data-auto="true" method="post">
    <div class="layui-card-body">
        <label class="layui-col-xs6">
            <span class="help-label"><b>节目标题</b>News Title</span>
            <input class="layui-input" name="title" placeholder="请输入节目标题" required value='{$vo.title|default=""}'>
        </label>

        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>选择场次</b>Category Parent</span>
            <select class='layui-select' name='cid' lay-search>
                {foreach $cates as $cate}
                {if isset($vo.cid) and $vo.cid eq $cate.id}
                <option selected value='{$cate.id}'>{$cate.title}</option>
                {else}
                <option value='{$cate.id}'>{$cate.title}</option>
                {/if}
                {/foreach}
            </select>
        </div>

        <label class="layui-col-xs6">
            <span class="help-label"><b>选送单位</b></span>
            <input class="layui-input" name="selection_unit" placeholder="请输入选送单位" required value='{$vo.selection_unit|default=""}'>
        </label>
        <label class="layui-col-xs6">
            <span class="help-label"><b>演出单位</b></span>
            <input class="layui-input" name="performance_unit" placeholder="请输入演出单位" required value='{$vo.performance_unit|default=""}'>
        </label>
        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>封面图片</b></span>
            <div class="relative block label-required-null">
                <input class="layui-input think-bg-gray" name="img" placeholder="请上传封面图片" readonly required value='{$vo.img|default=""}'>
                <a class="layui-icon layui-icon-upload input-right-icon" data-file data-field="img" data-type="gif,png,jpg,jpeg"></a>
            </div>
        </div>
        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>图片</b></span>
            <div class="relative block label-required-null">
                <input class="layui-input think-bg-gray" name="img_c" placeholder="请上传图片" readonly required value='{$vo.img_c|default=""}'>
                <a class="layui-icon layui-icon-upload input-right-icon" data-file data-field="img_c" data-type="gif,png,jpg,jpeg"></a>
            </div>
        </div>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>标签</b></span>
            <input class="layui-input" name="tag" placeholder="请输入标签" required value='{$vo.tag|default=""}'>
        </label>

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存数据</button>
            <button class="layui-btn layui-btn-danger" data-history-back data-confirm="确定要取消编辑吗？" type='button'>取消编辑</button>
        </div>
    </div>

</form>

<script>
    $('input[name="img"]').uploadOneImage();
    $('input[name="img_c"]').uploadMultipleImage();
</script>
{/block}
